﻿using System;
using Microsoft.SharePoint.WebControls;
using Kiiro.SiteDefinition.Core;

namespace Kiiro.SiteDefinition.ControlTemplates
{
    public class KiiroDeleteButton : DeleteItemButton
    {
        public BasePage Host
        {
            get { return ( BasePage ) Page; }
        }

        protected override void DeleteItem ( )
        {
            if ( Page is BasePage )
                Host.Delete();
            else
                base.DeleteItem ( );
        }
    }
}

/*************************************************************************
 * 
 * $Log: /Internal Projects/Kiiro/Kiiro.SiteDefinition/12/TEMPLATE/CONTROLTEMPLATES/Kiiro/KiiroDeleteButton.cs $
 * 
 * 8     1/11/10 11:51a Camerons
 * 
 * 7     12/16/09 5:36p Camerons
 * 
 * 6     30/09/09 1:08p Camerons
 * Implementing UserModel.GetOrCreateUser(). 
 * 
 * 5     17/08/09 11:07a Camerons
 * Added check-in comments section
 * 
 ************************************************************************/